/**
 * Class: Dot2D
 *
 * Purpose: 
 *
 * Created: Jan 27, 2010 @ 9:37:10 AM
 * @author Ken Scott
 */
package org.openfantasia.ps.shape;

import org.openfantasia.ps.actor.Actor;
import org.openfantasia.ps.particle.Particle;
import org.openfantasia.ps.shape.Shape;
import org.openfantasia.ui.PFrame;
import org.openfantasia.util.math.DPoint3;

import java.util.ArrayList;
import java.util.List;

public class CompoundShape extends Shape {

	private List<Actor> actors = new ArrayList<Actor>();


	public CompoundShape(PFrame frame) {
		super(frame);
	}


	public CompoundShape(PFrame frame, DPoint3 size) {
		super(frame, size);
	}


	public void add(Actor actor) {
		if(!actors.contains(actor)) {
			actors.add(actor);
		}
	}


	public void remove(Actor actor) {
		actors.remove(actor);
	}


	public void drawShape(Particle particle) {
		for(Actor actor : actors) {
			actor.draw(particle);
		}
	}
}